//package com.zyb.transaction.aop;
//
//
//import lombok.extern.slf4j.Slf4j;
//import org.aspectj.lang.JoinPoint;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.*;
//import org.springframework.stereotype.Component;
//
///**
// * 自定义切面类
// */
//
//@Slf4j
//@Aspect     //标注为切面类
//@Component  //给spring管理
//public class AopLog {
//    /**
//     * 前置通知
//     *
//     * @param joinPoint
//     */
//    @Before("pointcut()")
//    public void checkPrivilege(JoinPoint joinPoint) {
//        System.out.println("@Before 权限校验..." + joinPoint.toString());
//    }
//
//    @After("pointcut()")
//    public void after() {
//        System.out.println("@After 最终通知");
//    }
//
//    @AfterReturning(value = "pointcut()", returning = "result")
//    public void afterReturning(Object result) {
//
//        System.out.println("@AfterReturning 后置通知:" + result);
//    }
//
//    @Around("pointcut()")
//    public Object aroung(ProceedingJoinPoint joinpoint) throws Throwable {
//        System.out.println("@Around 环绕通知前增强");
//        Object obj = joinpoint.proceed();
//        System.out.println("@Around 环绕通知后增强");
//        return obj;
//    }
//
//    @AfterThrowing(value = "pointcut()", throwing = "ex")
//    public void afterThrowing(Exception ex) {
//        System.out.println("@AfterThrowing 抛出异常通知");
//    }
//
//    @Pointcut("execution(* UserServiceImpl.add(..))")
//    public void pointcut() {
//    }
//
//}
